package com.ansatsing.templateMethod.notUseTempMethod;
//泡咖啡：把水煮沸--》用沸水冲泡咖啡--》把咖啡倒进杯子---》加糖和牛奶
public class Coffee {
	//泡咖啡秘方--》决定整个算法骨架以及流程
	void prepareRecipe() {
		boilWater();
		brewCoffeeGrinds();
		pourInCup();
		addSugarAndMilk();
	}
	//1把水煮沸
	public void boilWater() {
		System.out.println("Boiling water");
	}
	//2用沸水冲泡咖啡
	public void brewCoffeeGrinds() {
		System.out.println("Dripping Coffee through filter");
	}
	//3把咖啡倒进杯子
	public void pourInCup() {
		System.out.println("Pouring into cup");
	}
	//4加糖和牛奶
	public void addSugarAndMilk() {
		System.out.println("Adding Sugar and Milk");
	}
}
